﻿using System.Collections.Generic;
using System.Management.Instrumentation;

namespace TimeTracker.data
{
    internal abstract class AbstractConnector
    {
        protected static AbstractConnector _instance;
        protected string pass;
        protected string server;
        protected string user;
        protected bool loggedIn = false;
        public Dictionary<string, Project> Projects { get; protected set; }
        public Project SelectedProject { get; protected set; }

        public static AbstractConnector GetInstance()
        {
            throw new InstanceNotFoundException();
        }

        public abstract Dictionary<string, Project> LoadProjects();

        public abstract SortedDictionary<int, Task> LoadTasks(Project project);

        public abstract bool SelectProject(string name);

        public abstract bool CanAddTimeToProject();

        public abstract bool Login(string address, string user, string password);

        public abstract bool LoggedIn();
    }
}